package com.qf.team2.netdisc.common.util;

/**
 * 流工具类
 *
 * @author Simon_Wong
 * @date 2021/05/20
 * @since 2021/5/20 9:55
 */
public class StreamUtils {
    /**
     * 关闭所有流
     *
     * @param closeables 可关闭流
     */
    public static void closeAll(AutoCloseable... closeables) {
        try {
            for (AutoCloseable closeable : closeables) {
                if (null != closeable) {
                    closeable.close();
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
